﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MyAzureDashboard.Configuration;
using NUnit.Framework;

namespace MyAzureDashboard.Tests
{
    [TestFixture]
    public class Encryption
    {
        [Test]
        public void WhenIPassInAStringToEncryptIGetAKnownValueBack()
        {
            //Arrange 
            const string input = "Lorum Ipsum";
            const string output = "i3CDQ2X+EdoRam5LWA+UvA==";

            //Act 
            var result = EncryptionHelper.Encrypt(input);

            //Assert 
            result.Is(output);
        }

        [Test]
        public void WhenIPassInAStringToDecryptIGetAKnownValueBack()
        {
            //Arrange 
            const string output = "Lorum Ipsum";
            const string input = "i3CDQ2X+EdoRam5LWA+UvA==";

            //Act 
            var result = EncryptionHelper.Decrypt(input);

            //Assert 
            result.Is(output);
        } 
    }
}
